<?xml version="1.0" encoding="UTF-8"?>

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui" template="../../Template.xhtml">
	<ui:define name="title">Manage Registration Helps</ui:define>
	<ui:define name="body">

		<h:form id="form">
			<br />
			<br />
			<p:panelGrid columns="2">

				<h2>Manage Registration Helps</h2>

			</p:panelGrid>
			<br />
			<br />
			<br />
			<br />
			<p:growl id="msgs" showDetail="true" />
			<p:dataTable id="basicDT" var="help" value="#{helpMB.listHelps}"
				rows="10" paginator="true"
				paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
				rowsPerPageTemplate="5,10,15">

				<p:column headerText="Id" style="text-align: center">
					<p:outputLabel value="#{help.idHelp}" />
				</p:column>

				<p:column headerText="Page" style="text-align: center">
					<p:outputLabel value="#{help.page}" />
				</p:column>

				<p:column headerText="Topic" style="text-align: center">
					<p:outputLabel value="#{help.topic}" escape="false"/>
				</p:column>
				
				<p:column headerText="Contents" style="text-align: center">
					<p:outputLabel value="#{help.contents.substring(0,120)}..." escape="false"/>
				</p:column>


				<p:column style="width:32px;text-align: center" headerText="Action">

					<p:commandButton ajax="false" icon="ui-icon-search" title="View"
						action="#{helpMB.view(help.idHelp)}">
					</p:commandButton>

					<p:commandButton ajax="false" action="#{helpMB.edit(help.idHelp)}"
						icon="ui-icon ui-icon-pencil" title="Edit">
					</p:commandButton>
				</p:column>

			</p:dataTable>

		</h:form>

	</ui:define>

</ui:composition>